"#);
assert_that(p.cargo_process("build").arg("--lib"),
- execs()
- .with_status(101)
- .with_stderr("There is no lib to build, remove `--lib` flag"));
+ execs().with_status(101)
+ .with_stderr("no library targets found"));
});
use support::{project, execs, main_file, basic_bin_manifest};
use support::{COMPILING, RUNNING, ProjectBuilder};
-use hamcrest::{assert_that, existing_file};
+use hamcrest::{assert_that, existing_file, is_not};
use support::paths::CargoPathExt;
use cargo::util::process;
"#)
.file("bar/src/main.rs", "");
assert_that(foo.cargo_process("build"),
- execs().with_status(101)
- .with_stderr("\
-Package `bar v0.0.0 ([..])` has no library targets"));
+ execs().with_status(0));
});
test!(recompile_space_in_name {
.exec_with_output()
.unwrap();
- assert_that(&p.bin("foo"), existing_file());
+ assert_that(&p.bin("foo"), is_not(existing_file()));
assert_that(&p.bin("examples/foo"), existing_file());
p.cargo("test").arg("--no-run").arg("-v")
.exec_with_output()
.unwrap();
- assert_that(&p.bin("foo"), existing_file());
+ assert_that(&p.bin("foo"), is_not(existing_file()));
assert_that(&p.bin("examples/foo"), existing_file());
});
assert_eq!(opt, "0");
let opt = env::var("PROFILE").unwrap();
- assert_eq!(opt, "compile");
+ assert_eq!(opt, "debug");
let debug = env::var("DEBUG").unwrap();
assert_eq!(debug, "true");
fn main() {
assert_eq!(env::var("OPT_LEVEL").unwrap(), "3");
- assert_eq!(env::var("PROFILE").unwrap(), "bench");
+ assert_eq!(env::var("PROFILE").unwrap(), "release");
assert_eq!(env::var("DEBUG").unwrap(), "false");
}
"#);
#[test] fn test_test() { foo::foo() }
"#);
- let output = p.cargo_process("test").exec_with_output().unwrap();
+ let output = p.cargo_process("test").arg("-v").exec_with_output().unwrap();
let output = str::from_utf8(&output.stdout).unwrap();
assert!(output.contains("test bin_test"), "bin_test missing\n{}", output);
assert!(output.contains("test lib_test"), "lib_test missing\n{}", output);